\(\int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx\) [199]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 34 \[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {\cos (c+d x)}{a d}+\frac {b \log (b+a \cos (c+d x))}{a^2 d} \]

[Out]

-cos(d*x+c)/a/d+b*ln(b+a*cos(d*x+c))/a^2/d

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3957, 2912, 12, 45} \[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {b \log (a \cos (c+d x)+b)}{a^2 d}-\frac {\cos (c+d x)}{a d} \]

[In]

Int[Sin[c + d*x]/(a + b*Sec[c + d*x]),x]

[Out]

-(Cos[c + d*x]/(a*d)) + (b*Log[b + a*Cos[c + d*x]])/(a^2*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = -\int \frac {\cos (c+d x) \sin (c+d x)}{-b-a \cos (c+d x)} \, dx \\ & = \frac {\text {Subst}\left (\int \frac {x}{a (-b+x)} \, dx,x,-a \cos (c+d x)\right )}{a d} \\ & = \frac {\text {Subst}\left (\int \frac {x}{-b+x} \, dx,x,-a \cos (c+d x)\right )}{a^2 d} \\ & = \frac {\text {Subst}\left (\int \left (1-\frac {b}{b-x}\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d} \\ & = -\frac {\cos (c+d x)}{a d}+\frac {b \log (b+a \cos (c+d x))}{a^2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88 \[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {-a \cos (c+d x)+b \log (b+a \cos (c+d x))}{a^2 d} \]

[In]

Integrate[Sin[c + d*x]/(a + b*Sec[c + d*x]),x]

[Out]

(-(a*Cos[c + d*x]) + b*Log[b + a*Cos[c + d*x]])/(a^2*d)

Maple [A] (verified)

Time = 0.47 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.41

method result size
derivativedivides \(\frac {-\frac {1}{a \sec \left (d x +c \right )}-\frac {b \ln \left (\sec \left (d x +c \right )\right )}{a^{2}}+\frac {b \ln \left (a +b \sec \left (d x +c \right )\right )}{a^{2}}}{d}\) \(48\)
default \(\frac {-\frac {1}{a \sec \left (d x +c \right )}-\frac {b \ln \left (\sec \left (d x +c \right )\right )}{a^{2}}+\frac {b \ln \left (a +b \sec \left (d x +c \right )\right )}{a^{2}}}{d}\) \(48\)
parallelrisch \(\frac {b \ln \left (-2 a +\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (a -b \right )\right )-b \ln \left (\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )-a \left (\cos \left (d x +c \right )+1\right )}{a^{2} d}\) \(59\)
risch \(-\frac {i x b}{a^{2}}-\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 d a}-\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 a d}-\frac {2 i b c}{a^{2} d}+\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{a^{2} d}\) \(90\)
norman \(-\frac {2}{d a \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}+\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )}{a^{2} d}-\frac {b \ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{a^{2} d}\) \(91\)

[In]

int(sin(d*x+c)/(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/a/sec(d*x+c)-1/a^2*b*ln(sec(d*x+c))+1/a^2*b*ln(a+b*sec(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.91 \[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {a \cos \left (d x + c\right ) - b \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{2} d} \]

[In]

integrate(sin(d*x+c)/(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

-(a*cos(d*x + c) - b*log(a*cos(d*x + c) + b))/(a^2*d)

Sympy [F]

\[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=\int \frac {\sin {\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]

[In]

integrate(sin(d*x+c)/(a+b*sec(d*x+c)),x)

[Out]

Integral(sin(c + d*x)/(a + b*sec(c + d*x)), x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.97 \[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {\frac {\cos \left (d x + c\right )}{a} - \frac {b \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{2}}}{d} \]

[In]

integrate(sin(d*x+c)/(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

-(cos(d*x + c)/a - b*log(a*cos(d*x + c) + b)/a^2)/d

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.12 \[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {\cos \left (d x + c\right )}{a d} + \frac {b \log \left ({\left | -a \cos \left (d x + c\right ) - b \right |}\right )}{a^{2} d} \]

[In]

integrate(sin(d*x+c)/(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

-cos(d*x + c)/(a*d) + b*log(abs(-a*cos(d*x + c) - b))/(a^2*d)

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88 \[ \int \frac {\sin (c+d x)}{a+b \sec (c+d x)} \, dx=\frac {b\,\ln \left (b+a\,\cos \left (c+d\,x\right )\right )-a\,\cos \left (c+d\,x\right )}{a^2\,d} \]

[In]

int(sin(c + d*x)/(a + b/cos(c + d*x)),x)

[Out]

(b*log(b + a*cos(c + d*x)) - a*cos(c + d*x))/(a^2*d)